<template>
    <el-container>
      <el-header>与您的宝贝聊天</el-header>
      <el-main>
        <div class="chat-container">
          <div v-for="msg in messages" :key="msg.id" :class="msg.isSelf ? 'message-bubble self' : 'message-bubble other'">
            {{ msg.content }}
          </div>
        </div>
        <div class="input-container">
          <el-input
            type="textarea"
            v-model="message"
            placeholder="在这里输入你的消息..."
            @keyup.enter="sendMessage">
          </el-input>
          <el-button type="primary" @click="sendMessage">发送</el-button>
        </div>
      </el-main>
    </el-container>
  </template>
  
  <script>
  import axios from 'axios';
  import { v4 as uuidv4 } from 'uuid';
  
  export default {
    data() {
      return {
        message: '',